﻿-- Define the relationship between Message and Person
ALTER TABLE [dbo].[Message] WITH CHECK ADD  
       CONSTRAINT [FK_Message_FromPerson] FOREIGN KEY([From])
REFERENCES [dbo].[Person] ([PersonId])
ON DELETE NO ACTION
GO
-- Define the relationship between Message and Person
ALTER TABLE [dbo].[Message] WITH CHECK ADD  
       CONSTRAINT [FK_Message_ToPerson] FOREIGN KEY([To])
REFERENCES [dbo].[Person] ([PersonId])
ON DELETE NO ACTION
GO